package org.boot.easyapi.core.framework.IdGenera;

import org.boot.easyapi.util.id.EasyApiSnowFlakeIdWorker8910;
import org.boot.easyapi.util.id.EasyApiSnowflakeIdWorker14;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration("easyapi-idGeneraConfig")
public class EasyApiIdGeneraConfig {

    public static final String ID_AUTO = "ID_AUTO";
    public static final String ID_SNOWFLAKE_8910 = "ID_SNOWFLAKE_8910";
    public static final String ID_SNOWFLAKE_14 = "ID_SNOWFLAKE_14";

    @Bean(name = "easyapi-easyApiSnowflakeIdWorker14")
    public EasyApiSnowflakeIdWorker14 easyApiSnowflakeIdWorker14(){
        return new EasyApiSnowflakeIdWorker14(1);
    }

    @Bean(name = "easyapi-easyApiSnowFlakeIdWorker8910")
    public EasyApiSnowFlakeIdWorker8910 easyApiSnowflakeIdWorker8910(){
        return new EasyApiSnowFlakeIdWorker8910(2,1);
    }
}
